import $ from './http';

const Api = '';

// 首页数据
export const getIndexData = () => $.get(Api + '/keep-web/getIndexData');

// 获取矿业记录
export const getMiningList = () => $.get(Api + '/keep-web/getMiningList');

// 获取用户信息
export const getUserInfo = (address) => $.get(Api + `/keep-web/getUserInfo?address=${address}`);

// 授权
export const approve = (data) => $.post(Api + `/keep-web/approve`, data);

// 质押
export const pledge = (data) => $.post(Api + `/keep-web/pledge`, data);

// 团队数据
export const getTeamData = (address) => $.get(Api + `/keep-web/getTeamData?address=${address}`);

// 账户提取
export const withdraw = (data) => $.post(Api + `/keep-web/withdraw`, data);

// 获取质押记录
export const getPledgeLog = (address) => $.get(Api + `/keep-web/getPledgeLog?address=${address}`);

// 闪兑
export const convert = (data) => $.post(Api + `/keep-web/convert`, data);

// 获取客服地址
export const getMyService = (address) => $.get(Api + `/keep-web/getMyService?address=${address}`);

// 获取最新价
export const getPrice = () => $.get(Api + `/keep-web/getPrice`);
